Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store Testing Framework Solidity and Yul #1052

Merged
merged 16 commits into from
Oct 4, 2024

Conversation

thedarkjester
Copy link
Contributor

@thedarkjester thedarkjester commented Aug 30, 2024

@OlivierBBB OlivierBBB mentioned this pull request Sep 16, 2024
@gauravahuja gauravahuja force-pushed the chore/solidity-testing-framework branch from 48c7e3f to e6ca2b5 Compare October 1, 2024 09:59
Copy link
Collaborator

@DavePearce DavePearce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, LGTM. However, I think some documentation would be useful to clarify what exactly is going on (e.g. around SolidityUtils.getContractByteCode().

private static final ObjectMapper objectMapper = new ObjectMapper();
private static final ClassLoader classLoader = SolidityUtils.class.getClassLoader();

public static Bytes getContractByteCode(Class<? extends Contract> contractClass) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super clear on what's happening here. I think it would be helpful to write some amount of documentation to explain (at a high level) what's going on.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some documentation for this method.

import org.web3j.tx.Contract;

public class SolidityUtils {
private static final ObjectMapper objectMapper = new ObjectMapper();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend using here JsonConverter class the embeds the ObjectMapper and offers some helpful functionalities.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API for JsonConverter requires the Class that can parsed from the json file. I do not have a Class for that, I am interested in just one particular attribute 'bin-runtime' of a specific contract in the json file.

@gauravahuja gauravahuja merged commit b0b3c04 into arith-dev Oct 4, 2024
5 checks passed
@gauravahuja gauravahuja deleted the chore/solidity-testing-framework branch October 4, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants